package tool

import tool.Pojo.ReportHomeData
import utils.Utils

/**
 * Created by yz on 16/3/2020
 */
trait ProjectTool {

  val sampleIdColumnName = "SampleID"
  val sampleIdColumnNameLower = sampleIdColumnName.toLowerCase

  def getReportHomeMap(configMap: Map[String, String]) = {
    val fieldMap = Utils.getFieldNamesByTs(List[ReportHomeData]()).map { x =>
      (x, "")
    }.toMap
    fieldMap ++ configMap.filter(_._1.startsWith("reportHome.")).map { case (k, v) =>
      (k.replaceAll("^reportHome\\.", ""), v)
    }
  }

}
